The present invention relates to an image processing device, in particular, an image processing device offering better expression with usage of pressure to a drawing input means thereof.
In an image processing device, an image to be processed is stored in a memory such as a frame memory and displayed on a monitor, and an input location on the image is specified using a drawing input means such as a combination of a stylus and a tablet. A processing area simulating a single touch of a stylus, etc. is called a patch, and various forms of patches, corresponding to a variety of drawing tools such as a pencil, chalk, hair pencil and brush, are stored. The information is stored, for example, in the form of tables, and values stored are, for example, densities of an input image. A user selects one table from these tables by selecting one kind of tool from a group of virtual drawing tools, and specifies an input location with the drawing input means. In this way, an image stored in the image memory is modified to execute image processing.
Pressure to a stylus, etc. (hereinafter may be called xe2x80x9cstylus pressurexe2x80x9d) represents the magnitude of an input. It has been known that a stylus density distribution under the maximum pressure (maximum stylus pressure) is stored in a table and the stylus pressure is reflected in the density distribution by multiplying the values stored in the table by the stylus pressure. In this technique, a density distribution of the maximum stylus density at the maximum stylus pressure is stored, and the stylus density drops in proportion to a drop in the stylus pressure. When the pressure to a real pen decreases, the stroke width, the form of the pen, and the texture and the like of the pen will change. In this technique, however, processing is limited to lowering the stylus density in proportion to the stylus density distribution at the maximum pressure.
It has been also known that the size of a patch is changed in proportion to the stylus pressure to reflect the stylus pressure in the stroke width of an input image (Japanese Unexamined Patent Hei3-41572, corresponding to U.S. Pat. No. 5,408,593). It, however, is difficult to execute changing the patch size in proportion to the stylus pressure with a table. In this piece of prior art, the patch size is determined by calculation from the stylus pressure value without use of any tables.
The drawing input means, however, imitates various drawing tools ranging from brush, pencil, to chalk, and in the case of these real drawing tools, as the stylus pressure changes, both the input density and the stroke width change. In the prior art, the effect of the stylus pressure is limited to either stroke width or density. In the case of real drawing tools, as the stylus pressure changes, the texture in the patch also changes. However, no technique is known that changes the texture according to the stylus pressure.
A primary object of the present invention is to offer better expression on an image processing device with the pressure exerted to a drawing input means, and a secondary object is to virtually provide users with varied drawing tools that may execute high-speed processing.
Another object of the present invention is to provide a specific configuration for executing the above-mentioned invention at a high speed.
Another object of the present invention is to enable high speed inputting for an image having a high spatial resolution and a better expression.
Another object of the present invention is to make the texture in a patch variable with the pressure and to express this texture even for a curved stroke.
The present invention provides an image processing device having a memory for storing an image, a monitor for displaying said stored image, a drawing input means for inputting an input location and pressure applied, and a table storing an input signal distribution for a single touch of said drawing input means for each of kinds of virtual pens, said image processing device characterized in that plural tables are provided for each of said pens and that said distribution is generated for said pressure by interpolating these tables. A drawing input means may be, for example, a combination of a stylus and a tablet. Any drawing input means will do, provided that it may specify the location of input on an image displayed on the monitor and the pressure, such as stylus pressure exerted to the stylus. A type of pen to be used is specified through, for example, a menu, and for each pen, are stored plural tables indicating an input signal distribution.
Preferably, at least two tables, one for a high pressure and one for a medium pressure, are provided for each of said pens, and at least a table for a low pressure is provided. They are arranged in such a way that, if said pressure is equal to or higher than the medium pressure, said distribution is determined by linear interpolation of the high pressure table and the medium pressure table, and if said pressure is equal to or lower than the medium pressure, said distribution is determined by linear interpolation of the medium pressure table and the low pressure table. A low pressure table corresponds to drawing input at, for example, the lowest pressure, and a single low pressure table may be used commonly for various pens.
Preferably, the resolution of said input location and the resolution of at least some of tables are arranged to be higher than the resolution of said stored image, and the read-out addresses of tables are arranged to be determined according to a surplus (sub-pixel address) of the resolution of the input location over the resolution of the stored image. For this purpose, the tables may be divided into plural ones in advance, and in this case, the sub-pixel address is used to select one to be read out. Instead of dividing tables according to sub-pixel address, data at addresses at intervals may be read out from the tables.
Preferably, each of said tables is a two-dimensional table, and is provided a means for reading out data after rotating the table according to the direction of travel of the drawing input. As a two-dimensional table is used, the texture in a patch may be expressed, and if the texture is changed according to the pressure, changes in texture with the stylus pressure may be expressed. Even when the texture has a directionality, the table may be effectively rotated according to the direction of travel of said input, for example, the direction of motion of the stylus, then the data or distribution of input signals may be read out. As for the rotation of the table, data may be read out after rotating the table, or for making rotational processing such as sub-pixel processing simpler, data after read-out may be rotated.
Preferably, a distribution of input signals with a texture is stored in at least a portion of each table.
Preferably, for each of at least some of pens, a low pressure table and a medium pressure table are provided, each storing an input signal distribution having plural peaks and a texture, and at least some of said plural peaks of said low pressure table and at least some of said plural peaks of said medium pressure table are arranged to be continuous in their locations in the tables. Here being continuous in peak locations means that locations of peaks are the same between the low pressure table and the medium pressure table or peak locations of the low pressure table are close to the peaks of the medium pressure table, for example, within the half width of the peak from the peak location. Preferably, in particular, on the low pressure table, an area in which input signals are virtually zero is provided between peaks.
In the present invention, for each kind of virtual pen provided for a user, plural tables corresponding to various pressures (stylus pressures) are provided, and they are interpolated. If the strength of input signals such as patch size or density distribution in a patch is varied from table to table, both the stroke width and the input density may be freely altered according to the pressure. As a result, expression in relation to the stylus pressure is enhanced, and varied virtual pens may be provided. Processing of tables is interpolation of linear or other types and may be done at a high speed by, for example, product sum operation.
Preferably, for medium and higher pressures at which influence of the pen kind is more conspicuous, a medium pressure table and a high pressure table are provided. For lower pressures at which influence of an input of any pen is small, a single table may be used irrespective of pen kinds, however, preferably, a low pressure table is provided for each pen. Then, according to the stylus pressure, linear interpolation is made between these tables. The number of tables required for each pen is two at the lowest and normally several. Thus, many kinds of pens may be provided with a relatively small number of tables. Moreover, processing of tables is linear interpolation and may be done at a high speed.
Preferably, read-out addresses of the tables are modified according to a sub-pixel address, and this allows more precise expression.
Preferably, texture in a patch is expressed by two-dimensional tables, and plural tables are interpolated according to the pressure. In this way, changes in texture with the stylus pressure may be expressed. Furthermore, as tables may be effectively rotated according to the direction of motion of the stylus, etc., the texture will be rotated as well, and if the direction of the stylus, etc. is bent, the direction of the texture will be bent; thus, enhanced expression for texture is achieved.
In particular, if distributions of input signals having plural peaks and texture are stored in two tables for a low pressure and a medium pressure, and at least some of peaks of one table is made continuous to that of the other table, a characteristic expression such as scratch may be made.